﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="changePassword.aspx.cs" Inherits="Skyworth.CRM.Web.SystemManagement.changePassword" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>修改密码</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <%--[if IE]>
     <link href="../themes/css/ieHack.css" rel="stylesheet" type="text/css" />
    <![endif]--%>
    <script src="../javascripts/jquery-1.4.4.min.js" type="text/javascript"></script>
    <link href="../themes/default/style.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/core.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/pages.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/wbox.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/Messagebox.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function() {

            $("#btnOk").click(function() {
                return SavaCheck();
            })
            $("#btnClose").click(function() {
                parent.addWindow.close();
                //parent.location.reload();
            })

            $("input[type='password']").hover(function() { $(this).addClass("txtOn"); },
                                                function() { $(this).removeClass("txtOn"); })
        })

        function SavaCheck() {
            var objOld = $("#txtOldPw");
            var oldPW = objOld.val();
            if (oldPW == "" || oldPW.length <= 0) {
                $("#txtMsg").text("请输入旧密码！");
                $("#txtMsg").fadeIn();
                objOld.focus();
                return false;
            }
            var objNew = $("#txtNewPW");
            var newPW = objNew.val();
            if (newPW == "" || newPW.length <= 0) {
                $("#txtMsg").text("请输入新密码！");
                $("#txtMsg").fadeIn();
                objNew.focus();
                return false;
            }

            var objNew1 = $("#txtNewPw1");
            var newPW1 = objNew1.val();
            if (newPW1 == "" || newPW1.length <= 0) {
                $("#txtMsg").text("请再次输入新密码！");
                $("#txtMsg").fadeIn();
                objNew1.focus();
                return false;
            }

            if (newPW != newPW1) {
                $("#txtMsg").text("两次输入的新密码不一致！");
                $("#txtMsg").fadeIn();
                objNew1.focus();
                return false;
            }
        }
    </script>
    <style type="text/css">
    html
        {
            overflow-x: hidden;
        }
        table
        {
        	  border-collapse: collapse;
              border-spacing: 0;
              table-layout: fixed;
              width  : 100%;
              border: solid 1px #e7e7e7;
        }
        table tr td
        {
        	 border-bottom: solid 1px #e7e7e7;
        	 padding:0px 3px;
        	 background-color: #EFEFEF;      	 
        	 
        }
        td label
        {       	
        	 padding:2px 2px;
        }
        td.left
        {        	
        	border-right: solid 1px #e7e7e7;
        	width: 80px;
        }  
        td.right
        {
        	background:#FFF;
        }
        td.right,td.readOnly
        {          
          padding:5px 3px;
        }        
        
       .red
       {
       	color:Red; font-weight :bold;
       }
    </style>
</head>
<body>
    <form id="form1" runat="server">
     <div>
        <table>
            <tr>
                <td class="left">
                    <label for="txtUserName">
                        用户名称：</label>
                </td>
                <td class="right">
                    <asp:TextBox ID="txtUserName" CssClass="txt" runat="server" MaxLength="50" Enabled="false"></asp:TextBox><em class="red">*</em>
                </td>
            </tr>
            <tr>
                <td class="left">
                    <label for="txtOldPw">
                        旧密码：</label>
                </td>
                <td class="right">
                    <asp:TextBox ID="txtOldPw" CssClass="txt" runat="server" MaxLength="50" 
                        TextMode="Password" ></asp:TextBox><em class="red">*</em></td>
            </tr>
           <tr>
                <td class="left">
                    <label for="txtNewPW">
                        新密码：</label>
                </td>
                <td class="right">
                    <asp:TextBox ID="txtNewPW" CssClass="txt" runat="server" MaxLength="50" 
                        TextMode="Password"></asp:TextBox><em class="red">*</em></td>
            </tr>
            <tr>
                <td class="left">
                    <label for="txtNewPw1">
                        确认新密码：</label>
                </td>
                <td class="right">
                    <asp:TextBox ID="txtNewPw1" CssClass="txt" runat="server" TextMode="Password" MaxLength="50"></asp:TextBox><em class="red">*</em></td>
            </tr>
            <tr>
                <td colspan="2" class="readOnly" style="padding-right:12px; background:url('../themes/default/images/grid/grid.png') repeat scroll 0 0">
                    <asp:TextBox ID="hiddPW" runat="server" Visible="false"></asp:TextBox>
                    <a title="关闭该页面" href="javascript:void(0)" class="button" style="float:left" id="btnClose"><span>关闭</span></a>
                     <span style="padding:5px;display:none; width:150px;float:left" class="red" id="txtMsg"></span>  
                   
                    <div class="buttonActive" style="float:right">
                        <div class="buttonContent" >
                            <asp:Button ID="btnOk" runat="server" Text="确定"  CssClass="serverButton" 
                                onclick="btnOk_Click" />
                         </div>
                    </div>
                    <%--<div class="buttonDisabled" >
                        <div class="buttonContent">
                            <button>
                                我被禁用</button></div>
                    </div>--%>
                </td>
            </tr>
        </table>
             
    </div>
    </form>
</body>
</html>
